<?php

namespace app\model;

/**
 * @property integer $id 主键(主键)
 * @property string $openid 登录凭证
 * @property string $game_openid
 * @property string $nickname 昵称
 * @property string $avatar 头像
 * @property string $phone 绑定手机号
 * @property string $backup_phone
 * @property string $is_privacy
 * @property string $is_bind
 * @property string $last_time 登录时间
 * @property string $last_ip 登录ip
 * @property string $join_time 注册时间
 * @property string $join_ip 注册ip
 * @property integer $status 状态 0禁用 1启用
 * @property integer $wx_notice 微信消息通知
 * @property integer $platform 平台 0测试 1微信小程序
 * @property string $created_at 创建时间
 * @property string $updated_at 更新时间
 * @property string $agent_id
 * @property string $is_agent
 * @property string $agent_type
 * @property string $agent_qrcode
 * @property string $is_open_distribution
 * @property string $team_id
 *
 */
class User extends Base
{
    /**
     * The table associated with the model.
     *
     * @var string
     */
    protected $table = 'wa_users';

    /**
     * The primary key associated with the table.
     *
     * @var string
     */
    protected $pk = 'id';

    protected $hidden = ['created_at', 'updated_at','status','last_time','last_ip','join_ip','platform','openid'];



    public function carQrcode(){

        return $this->hasMany('CarQrcode','user_id','id');
    }
}
